package com.taoyuanx.boot.model;

import com.baomidou.mybatisplus.enums.IdType;

import java.util.Arrays;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author taoyuan
 * @since 2017-12-16
 */
public class App extends Model<App>  {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * app名称
     */
	@TableField("app_name")
	private String appName;
    /**
     * 开放key
     */
	@TableField("open_key")
	private String openKey;
    /**
     * 开放密码
     */
	@TableField("open_pwd")
	private String openPwd;
    /**
     * 开放公钥
     */
	@TableField("open_pub")
	private byte[] openPub;
    /**
     * 状态1无效 0正常
     */
	private Integer status;
    /**
     * 创建日期
     */
	private Date createtime;
    /**
     * 结束时间
     */
	@TableField("end_time")
	private Long endTime;
	/**
	 * 允许ip
	 */
	@TableField("allow_ip")
	private String allowIp;
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getOpenKey() {
		return openKey;
	}

	public void setOpenKey(String openKey) {
		this.openKey = openKey;
	}

	public String getOpenPwd() {
		return openPwd;
	}

	public void setOpenPwd(String openPwd) {
		this.openPwd = openPwd;
	}

	public byte[] getOpenPub() {
		return openPub;
	}

	public void setOpenPub(byte[] openPub) {
		this.openPub = openPub;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}



	public Long getEndTime() {
		return endTime;
	}

	public void setEndTime(Long endTime) {
		this.endTime = endTime;
	}

	public String getAllowIp() {
		return allowIp;
	}

	public void setAllowIp(String allowIp) {
		this.allowIp = allowIp;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "App [id=" + id + ", appName=" + appName + ", openKey=" + openKey + ", openPwd=" + openPwd + ", openPub="
				+ Arrays.toString(openPub) + ", status=" + status + ", createtime=" + createtime + ", endTime="
				+ endTime + ", allowIp=" + allowIp + "]";
	}
	

}
